import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: '登录',
    component: () =>
      import(/* webpackChunkName: "login" */ '../views/login.vue')
  },
  {
    path: '/',
    name: '注册',
    component: () =>
      import(/* webpackChunkName: "login" */ '../views/register.vue')
  },
  {
    path: '/:pathMatch(.*)',
    name: '404',
    component: () =>
      import(/* webpackChunkName: "404" */ '../views/404Page.vue')
  },
  {
    path: '/staging',
    name: '工作台',
    component: () =>
      import(/* webpackChunkName: "staging" */ '../views/Staging.vue')
  },
  {
    path: '/all/articles',
    name: '所有文章',
    component: () =>
      import(
        /* webpackChunkName: "allarticles" */ '../views/TwoStage/AllArticles.vue'
      )
  },
  
  {
    path: '/classification/management',
    name: '分类管理',
    component: () =>
      import(
        /* webpackChunkName: "classificationmanagement" */ '../views/TwoStage/ClassificationManagement.vue'
      )
  },
  {
    path: '/label/management',
    name: '标签管理',
    component: () =>
      import(
        /* webpackChunkName: "labelmanagement" */ '../views/TwoStage/LabelManagement.vue'
      )
  },
  {
    path: '/page',
    name: '页面管理',
    component: () => import(/* webpackChunkName: "page" */ '../views/Page.vue')
  },
  {
    path: '/knowledge/booklet',
    name: '知识小册',
    component: () =>
      import(
        /* webpackChunkName: "knowledgebooklet" */ '../views/KnowledgeBooklet.vue'
      )
  },
  {
    path: '/poster',
    name: '海报管理',
    component: () =>
      import(/* webpackChunkName: "poster" */ '../views/Poster.vue')
  },
  {
    path: '/comment',
    name: '评论管理',
    component: () =>
      import(/* webpackChunkName: "comment" */ '../views/Comment.vue')
  },

  {
    path: '/mail',
    name: '邮件管理',
    component: () => import(/* webpackChunkName: "mail" */ '../views/Mail.vue')
  },
  {
    path: '/file/management',
    name: '文件管理',
    component: () =>
      import(
        /* webpackChunkName: "filemanagement" */ '../views/FileManagement.vue'
      )
  },
  {
    path: '/search/secords',
    name: '搜索记录',
    component: () =>
      import(
        /* webpackChunkName: "SearchSecords" */ '../views/SearchSecords.vue'
      )
  },
  {
    path: '/access/statistics',
    name: '访问统计',
    component: () =>
      import(
        /* webpackChunkName: "AccessStatistics" */ '../views/AccessStatistics.vue'
      )
  },
  {
    path: '/user/management',
    name: '用户管理',
    component: () =>
      import(
        /* webpackChunkName: "UserManagement  " */ '../views/UserManagement.vue'
      )
  },
  {
    path: '/system/settings',
    name: '系统设置',
    component: () =>
      import(
        /* webpackChunkName: "SystemSettings" */ '../views/SystemSettings.vue'
      )
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
